package signup.ui;
import signup.domain.UsersService;
public class loginHandler {
 String username;
 String password;
 boolean loggedIn=false;
 UsersService userService;
public String getUsername() {
	return username;
}
public void setUsername(String username) {
	this.username = username;
}
public String getPassword() {
	return password;
}
public void setPassword(String password) {
	this.password = password;
}
public UsersService getUserService() {
	return userService;
}
public void setUserService(UsersService userService) {
	this.userService = userService;
}
 
public String authenticate(){
	loggedIn=userService.authenticateUser(this.username, this.password);
	if (loggedIn)
		return "success";
	else
		return "failure"; 
}
public boolean isLoggedIn() {
	return loggedIn;
}
public void setLoggedIn(boolean loggedIn) {
	this.loggedIn = loggedIn;
}
 
 
}
